{% extends "admin/base.html" %}

{% block main %}
	<div class='main'>
	{% if links %}
		<table class='list'>
		<tr>
			<th>链接标签</th>
			<th>地址</th>
			<th>&nbsp;</th>
		</tr>
		{% for link in links %}
		<tr class="{{ loop.cycle('', 'alt') }}">
			<td>
				<a href='/admin/links/{{ link.id }}/edit/'><strong>{{ link.label }}</strong></a>
				{% if link.is_highlight %} * {% endif %}
			</td>
			<td><a href='{{ link.url }}' target='_blank' class='link'>{{ link.url|truncate(length=30, killwords=True, end='...') }}</a></td>
			<td><a href='/admin/links/{{ link.id }}/delete/' class='del'>删除</a></td>
		</tr>
		{% endfor %}
		</table>
		
	{% else %}
		<span class='notify'>没有任何链接。</span>
	{% endif %}
		<p>&nbsp;</p>
		<div class='forwardlinks'>
			<a href='/admin/links/new/'>添加链接</a>
		</div>
	
	</div>
{% endblock %}